//
//  BaseViewController.m
//  LMTestPatchDemo
//
//  Created by mengmenglu on 4/15/16.
//  Copyright © 2016 Hangzhou TaiXuan Network Technology Co., Ltd. All rights reserved.
//

#import "BaseViewController.h"

@implementation BaseViewController

- (instancetype)init {
    
    self = [super init];
    
    if (self) {
        [LMPatchManager runJavaScriptFile:[NSStringFromClass([self class]) stringByAppendingString:@".js"]];
        [LMPatchManager runLuaFile:[NSStringFromClass([self class]) stringByAppendingString:@".lua"]];
    }
    
    return self;
}


- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    
    self = [super initWithCoder:aDecoder];
    
    if (self) {
        
        [LMPatchManager runJavaScriptFile:[NSStringFromClass([self class]) stringByAppendingString:@".js"]];
        [LMPatchManager runLuaFile:[NSStringFromClass([self class]) stringByAppendingString:@".lua"]];
    }
    
    return self;
}


- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    
    if (self) {
        
        [LMPatchManager runJavaScriptFile:[NSStringFromClass([self class]) stringByAppendingString:@".js"]];
        [LMPatchManager runLuaFile:[NSStringFromClass([self class]) stringByAppendingString:@".lua"]];
    }
    
    return self;
}



- (void)viewDidLoad {
    
    [super viewDidLoad];
}


@end
